package org.apache.jsp.member;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;

public final class Login_jsp extends org.apache.jasper.runtime.HttpJspBase
    implements org.apache.jasper.runtime.JspSourceDependent {

  private static final JspFactory _jspxFactory = JspFactory.getDefaultFactory();

  private static java.util.List _jspx_dependants;

  private javax.el.ExpressionFactory _el_expressionfactory;
  private org.apache.AnnotationProcessor _jsp_annotationprocessor;

  public Object getDependants() {
    return _jspx_dependants;
  }

  public void _jspInit() {
    _el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();
    _jsp_annotationprocessor = (org.apache.AnnotationProcessor) getServletConfig().getServletContext().getAttribute(org.apache.AnnotationProcessor.class.getName());
  }

  public void _jspDestroy() {
  }

  public void _jspService(HttpServletRequest request, HttpServletResponse response)
        throws java.io.IOException, ServletException {

    PageContext pageContext = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;


    try {
      response.setContentType("text/html;charset=euc-kr");
      pageContext = _jspxFactory.getPageContext(this, request, response,
      			null, false, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");

	HttpSession session = request.getSession(false);
	if(session != null && session.getAttribute("loginYn")!=null && ((String)session.getAttribute("loginYn")).equals("Y"))
	{

      out.write("\r\n");
      out.write("<SCRIPT language=\"JavaScript\">\r\n");
      out.write("\tfunction logoutAction()\r\n");
      out.write("\t{\r\n");
      out.write("\t\twindow.location.href = \"/servlet/service.MemberServlet?func=member_002\";\r\n");
      out.write("\t}\r\n");
      out.write("\r\n");
      out.write("\tfunction goUpdateAction()\r\n");
      out.write("\t{\r\n");
      out.write("\t\twindow.location.href = \"/servlet/service.MemberServlet?func=member_011&from=login\";\r\n");
      out.write("\t}\r\n");
      out.write("\r\n");
      out.write("\tfunction leaveAction()\r\n");
      out.write("\t{\r\n");
      out.write("\t\tif(confirm(\"회원을 탈퇴하시면, 서비스를 받을 수 없습니다.\\n\\n탈퇴신청을 계속하시겠습니까?\"))\r\n");
      out.write("\t\t{\r\n");
      out.write("\t\t\twindow.location.href = \"/servlet/service.MemberServlet?func=member_013\";\r\n");
      out.write("\t\t}\r\n");
      out.write("\t}\r\n");
      out.write("</SCRIPT>\r\n");
      out.write("\r\n");
      out.write("<TABLE width=\"130\" height=\"80\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\r\n");
      out.write("\t<TR>\r\n");
      out.write("\t\t<TD width=\"130\" align=\"left\" class=\"cont\" valign=\"bottom\">\r\n");
      out.write("\t\t\t<FONT color=\"#666666\">\r\n");
      out.write("\t\t\t\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r\n");
      out.write("\t\t\t\t<B><A href=\"/servlet/service.MemberServlet?func=member_014\">");
      out.print( session.getAttribute("name"));
      out.write("</A></B>\r\n");
      out.write("\t\t\t\t님<BR>\r\n");
      out.write("\t\t\t\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;좋은하루 되세요!\r\n");
      out.write("\t\t\t</FONT>\r\n");
      out.write("\t\t</TD>\r\n");
      out.write("\t</TR>\r\n");
      out.write("\t<TR><TD width=\"130\" height=\"3\" colspan=\"2\"></TD></TR>\r\n");
      out.write("\t<TR>\r\n");
      out.write("\t\t<TD width=\"130\" align=\"left\" colspan=\"2\">\r\n");
      out.write("\t\t\t&nbsp;\r\n");
      out.write("\t\t\t<IMG width =\"38\" src=\"/images/member/btn_logout.gif\" border=\"0\" style=\"cursor:hand\" onclick=\"logoutAction();\">\r\n");
      out.write("\t\t\t<IMG width =\"38\" src=\"/images/member/btn_myedit.gif\" border=\"0\" style=\"cursor:hand\" onclick=\"goUpdateAction();\">\r\n");
      out.write("\t\t\t<IMG width =\"38\" src=\"/images/member/btn_leave.gif\" border=\"0\" style=\"cursor:hand\" onclick=\"leaveAction();\"><BR>\r\n");
      out.write("\t\t\t<A href=\"/common/AdminWindow/AdminFrame.jsp\"><B>관리자모드</B></A>\r\n");
      out.write("\t\t</TD>\r\n");
      out.write("\t</TR>\r\n");
      out.write("</TABLE>\r\n");

	}
	else
	{

      out.write("\r\n");
      out.write("<SCRIPT language=\"JavaScript\">\r\n");
      out.write("\tfunction loginAction()\r\n");
      out.write("\t{\r\n");
      out.write("\t\tvar f = document.loginForm;\r\n");
      out.write("\t\tif(f.id.value == \"\")\r\n");
      out.write("\t\t{\r\n");
      out.write("\t\t\twindow.alert(\"ID를 반드시 입력해야 합니다.\");\r\n");
      out.write("\t\t\tf.id.focus();\r\n");
      out.write("\t\t\treturn false;\r\n");
      out.write("\t\t}\r\n");
      out.write("\t\tif(f.id.value.length < 4 || f.id.value.length > 20)\r\n");
      out.write("\t\t{\r\n");
      out.write("\t\t\twindow.alert(\"ID는 4자 이상 20자 이하 입니다.\");\r\n");
      out.write("\t\t\tf.id.select();\r\n");
      out.write("\t\t\treturn false;\r\n");
      out.write("\t\t}\r\n");
      out.write("\r\n");
      out.write("\t\tif(f.pw.value == \"\")\r\n");
      out.write("\t\t{\r\n");
      out.write("\t\t\twindow.alert(\"비밀번호를 반드시 입력해야 합니다.\");\r\n");
      out.write("\t\t\tf.pw.focus();\r\n");
      out.write("\t\t\treturn false;\r\n");
      out.write("\t\t}\r\n");
      out.write("\t\tif(f.pw.value.length < 4 || f.pw.value.length > 20)\r\n");
      out.write("\t\t{\r\n");
      out.write("\t\t\twindow.alert(\"비밀번호를 4자 이상 20자 이하 입니다.\");\r\n");
      out.write("\t\t\tf.pw.select();\r\n");
      out.write("\t\t\treturn false;\r\n");
      out.write("\t\t}\r\n");
      out.write("\t\tf.func.value=\"member_001\";\r\n");
      out.write("\r\n");
      out.write("\t\tf.submit();\r\n");
      out.write("\t}\r\n");
      out.write("\r\n");
      out.write("\tfunction ruleAction()\r\n");
      out.write("\t{\r\n");
      out.write("\t\tvar f = document.loginForm;\r\n");
      out.write("\t\tf.func.value=\"member_003\";\r\n");
      out.write("\t\tf.submit();\r\n");
      out.write("\t}\r\n");
      out.write("</SCRIPT>\r\n");
      out.write("\r\n");
      out.write("<TABLE width=\"150\" height=\"95\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" bgcolor=\"#C5C5C5\">\r\n");
      out.write("\t<FORM name=\"loginForm\" action=\"/servlet/service.MemberServlet\" method=\"post\">\r\n");
      out.write("\t\t<INPUT type=\"hidden\" name=\"func\" value=\"member_001\">\r\n");
      out.write("\t\t<TR>\r\n");
      out.write("\t\t\t<TD  align=\"center\">\r\n");
      out.write("\t\t\t\t<INPUT type=\"text\" name=\"id\" maxlength=\"15\" tabindex=\"1\" style=\"heigth: 21px; width:80px; BORDER-RIGHT: #DADADA 1px solid;  BORDER-TOP: #DADADA 1px solid; BORDER-LEFT: #DADADA 1px solid;  BORDER-BOTTOM: #DADADA 1px solid; BACKGROUND-COLOR: #FFFFFF;\" onkeydown=\"if(event.keyCode == 13){document.loginForm.pw.focus();}\">\r\n");
      out.write("\t\t\t</TD>\r\n");
      out.write("\t\t\t<TD width=\"60\">\r\n");
      out.write("\t\t\t\t<INPUT type=\"checkbox\"><FONT size=\"1\">ID저장</FONT>\r\n");
      out.write("\t\t\t</TD>\r\n");
      out.write("\t\t</TR>\r\n");
      out.write("\t\t<TR>\r\n");
      out.write("\t\t\t<TD  align=\"center\">\r\n");
      out.write("\t\t\t\t<INPUT type=\"password\" name=\"pw\" maxlength=\"15\" tabindex=\"2\" style=\"heigth: 21px; width:80px; BORDER-RIGHT: #DADADA 1px solid;  BORDER-TOP: #DADADA 1px solid; BORDER-LEFT: #DADADA 1px solid;  BORDER-BOTTOM: #DADADA 1px solid; BACKGROUND-COLOR: #FFFFFF;\" onkeydown=\"if(event.keyCode == 13){loginAction();}\">\r\n");
      out.write("\t\t\t</TD>\r\n");
      out.write("\t\t\t<TD width=\"60\">\r\n");
      out.write("\t\t\t\t<IMG src=\"/images/Login/login_button.png\" border=\"0\" style=\"cursor:hand\" onClick=\"loginAction();\">\r\n");
      out.write("\t\t\t</TD>\r\n");
      out.write("\t\t</TR>\r\n");
      out.write("\r\n");
      out.write("\t\t<TR>\r\n");
      out.write("\t\t\t<TD colspan=2>\r\n");
      out.write("\t\t\t\t<HR>\r\n");
      out.write("\t\t\t</TD>\r\n");
      out.write("\t\t</TR>\r\n");
      out.write("\t\t<TR>\r\n");
      out.write("\t\t\t<TD colspan=2>\r\n");
      out.write("\t\t\t\t<B>고객님!</B> 혜택을 확인하세요\r\n");
      out.write("\t\t\t\t<A href=\"/common/AdminWindow/AdminFrame.jsp\"><B>관리자모드</B></A>\r\n");
      out.write("\t\t\t</TD>\r\n");
      out.write("\t\t</TR>\r\n");
      out.write("\t</FORM>\r\n");
      out.write("</TABLE>\r\n");

	}

    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)){
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0)
          try { out.clearBuffer(); } catch (java.io.IOException e) {}
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
}
